package bairui.international.service.impl;

import org.springframework.stereotype.Service;

import bairui.international.model.domain.jpa.TB_BranchCompanyStaff;
import bairui.international.model.domain.jpa.TB_BranchCompanyStaffMoneyRecord;
import bairui.international.model.domain.jpa.TB_BranchCompanyStaffRoyaltyRecord;
import bairui.international.model.domain.jpa.TB_ProductOrder;
import bairui.international.model.domain.jpa.TB_ProductOrderItem;
import bairui.international.service.Service_BranchCompanyStaffRoyaltyRecord;

/**
 * 
 * 【(分公司员工提成记录)TB_BranchCompanyStaffRoyaltyRecord】服务实现
 *
 * @generated
 * 
 * @see bairui.international.model.domain.jpa.TB_BranchCompanyStaffRoyaltyRecord 模型
 * @see Service_BranchCompanyStaffRoyaltyRecord 服务接口
 * @see BService_BranchCompanyStaffRoyaltyRecordImpl 服务实现基础
 *
 */
@Service
public class Service_BranchCompanyStaffRoyaltyRecordImpl extends BService_BranchCompanyStaffRoyaltyRecordImpl implements Service_BranchCompanyStaffRoyaltyRecord {

	@Override
	public TB_BranchCompanyStaffRoyaltyRecord createInstance(TB_BranchCompanyStaff branchCompanyStaff, TB_ProductOrderItem orderItem, TB_ProductOrder order, double money, double rate) {
		return dao.save(new TB_BranchCompanyStaffRoyaltyRecord(
				new TB_BranchCompanyStaffRoyaltyRecord.MustProperties() {
					@Override public Double getMoney() {
						return money;
					}
					@Override public TB_ProductOrder getProductOrder() {
						return order;
					}
					@Override public TB_ProductOrderItem getProductOrderItem() {
						return orderItem;
					}
					@Override public TB_BranchCompanyStaff getBranchCompanyStaff() {
						return branchCompanyStaff;
					}
					@Override public Double getRate() {
						return rate;
					}
				}, 
				new TB_BranchCompanyStaffRoyaltyRecord.OptionalSingleProperties() {
					@Override public TB_BranchCompanyStaffMoneyRecord getBranchCompanyStaffMoneyRecord() {
						return null;
					}
				}
			));
	}
	
}
